<template>
  <div
    class="goog-list-item"
    @click="$router.push('/gooddetail?id=' + data.id)"
  >
    <img
      v-if="data.isHotSale === 1"
      class="sanjiao"
      src="../../assets/images/home/hot-j.png"
      alt=""
    />
    <img
      v-if="data.isLatest === 1"
      class="sanjiao"
      src="../../assets/images/home/new-j.png"
      alt=""
    />
    <img :src="data.coverImg" alt="" />
    <div class="name">{{ data.name }}</div>
    <div class="coin">
      {{ data.coin }}<img src="../../assets/images/home/monad.png" alt="" />
    </div>
    <div class="btn">立即兑换</div>
  </div>
</template>
 
<script>
export default {
  props: ["data"],
  data() {
    return {};
  },
};
</script>
 
<style lang = "less" scoped>
.goog-list-item {
  width: 285px;
  position: relative;
  text-align: center;
  background-color: #fff;
  cursor: pointer;
  transition: 0.5s;
  &:hover .btn {
    background-color: #0a328e;
    color: #fff;
  }
  .sanjiao {
    position: absolute;
    left: 0;
    top: 0;
  }
  .name {
    font-size: 18px;
    font-family: SourceHanSansSC;
    font-weight: 300;
    color: #333333;
    padding-top: 18px;
  }
  .coin {
    font-size: 18px;
    font-family: SourceHanSansSC;
    font-weight: bold;
    color: #fd604d;
    padding: 16px 0;
    img {
      width: 20px;
      height: 20px;
      padding-left: 5px;
      vertical-align: middle;
    }
  }
  .btn {
    width: 100px;
    height: 36px;
    border: 1px solid #0a328e;
    text-align: center;
    margin: 0 auto 32px;
    line-height: 36px;
  }
}
.goog-list-item:hover {
  transform: translateY(-15px);
}
</style>